<?php $goods_spec = isset($result->goods_spec) ? unserialize($result->goods_spec) : ''; ?>
<div class="alert alert-success">商品附加属性</div>
<?php foreach ($additive->result() as $key => $item) : ?>
    <div class="control-group ">
        <label class="control-label"><?php echo $item->name ?></label>
        <div class="controls">
            <input type="text" name="value[]" value="<?php echo isset($goods_spec[$item->name]) ? $goods_spec[$item->name] : '' ?>" class="m-wrap span8" >
            <input type="hidden" class="m-wrap large" name="key[]" value="<?php echo $item->name ?>">
        </div>
    </div>
<?php endforeach; ?>